﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HMIS.Infrastructure.Core.Repositories;

namespace HMIS.Infrastructure.Core.Services.Impl
{
    public class DictionaryServiceImpl : IDictionaryService
    {
        private IDictionaryRepository DictionaryRepository;
        public DictionaryServiceImpl(IDictionaryRepository DictionaryRepository)
        {
            this.DictionaryRepository = DictionaryRepository;
        }
        //上面的代码是上篇将的依赖注入，别忘记了：）
        #region IDictionaryService 成员

        public void InsertTwice()
        {
            var dic1 = new Dictionary();
            var dic2 = new Dictionary();
            DictionaryRepository.SaveOrUpdate(dic1);
            DictionaryRepository.SaveOrUpdate(dic2);
        }

        #endregion
    }
}
